home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / tur_c_tu.arc / PBS.TXT < prev    next >
Text File  |  1989-04-01  |  14KB  |  324 lines

  1. The TEXT and SOURCE code diskettes have been provided on this disk in an
  2. archived form in order to save space and to keep the files together.  In
  3. order to retrieve the files:
  4.  
  5. With a 2-floppy system:
  6.  
  7.   1) Put a blank (formatted) disk in the B: drive - See the inside back
  8.      cover of the Public Brand Software catalog for preparation information.
  9.  
  10.   2) At the A> prompt, issue the command    PKXARC TEXT B:
  11.  
  12. With a hard disk system:
  13.  
  14.   1) Prepare a subdirectory for the data  C> MD\NEWDIR
  15.      (NEWDIR is any name you wish -
  16.       or pick an existing subdirectory)
  17.  
  18.   2) Go to that new subdirectory          C> CD\NEWDIR
  19.  
  20.   3) Issue the command                    C> A:PKXARC A:TEXT
  21.  
  22.  
  23.  
  24. Repeat the above for the other .ARC file on the disk: SOURCE
  25.  
  26. On some PC Jr's the program PKXARCJR will work better than PKXARC, in
  27. this case substitute PKXARCJR for PKXARC in the instructions above.
  28.  
  29. ---------------------------------------------
  30.  
  31. Coronado Enterprises Turbo-C TUTOR                July 1, 1987
  32.  
  33. READ.ME File
  34.  
  35.  
  36. Getting Started with the Turbo-C tutorial
  37.  
  38.      The first thing you should do is to backup the distribution
  39. diskettes and store the distribution diskettes away in a safe
  40. place.  Use only the copy for all operations.  Note that the file
  41. named COMPILER.DOC will give you explicit directions for getting
  42. started with Turbo C, so you should read it at this time.
  43.  
  44.  
  45. Getting started with the TEXT diskette
  46.  
  47.      Before you can begin study of C, you must print out a copy
  48. of the tutorial text.  The file named PRINTEXT.BAT is designed
  49. to help you to do this.  Simply type the name PRINTEXT at the
  50. DOS prompt and all of the tutorial text will be printed for you.
  51. When the system displays "Name of list device [PRN]:", hit the
  52. return key to accept the default.  This batch file uses the DOS
  53. command PRINT.COM to actually do the printing and it has an upper
  54. limit of 10 files that can be queued up at once.  There is there-
  55. fore a pause after each group of print requests to allow the
  56. queue to empty out, after which you must hit any key to allow
  57. printing to continue.  If you key these commands in manually,
  58. you can print in the background, and be using your computer to
  59. do something else (provided of course that the something else
  60. doesn't require the printer).
  61.  
  62.  
  63. Getting started with the SOURCE diskette
  64.  
  65.      If you desire, a printout of all of the C files can be made
  66. using the PRINTALL.BAT file included.  Simply type PRINTALL at the
  67. command prompt with the printer on and lots of paper in place.
  68. It will print about 150 pages including this file and some other
  69. definition files.  You may want to edit a copy of the PRINTALL.BAT
  70. file to only print part of the files initially, and print the
  71. remainder as you come to them in the lessons.
  72.  
  73.      PRINTALL.BAT uses the file LIST.EXE to actually do the print-
  74. ing.  This is a program written in C, and included in your tutorial
  75. as an example program in chapter 14, and compiled for you to use in
  76. this step.  Since printers are not standard there is a chance that
  77. LIST.EXE will not work on your printer.  If it doesn't, use the
  78. file named LIST.COM from the other disk.  LIST.COM was written to
  79. do the same job, but it was written in Pascal and compiled with
  80. Turbo Pascal.  Since it uses a different compiler, it may work
  81. correctly on your printer.  After you gain experience, you can
  82. debug LIST.C and LISTF.C and compile them for use with your partic-
  83. ular printer.  If neither works, use whatever method you can to
  84. print out the files, if you desire to.  It is not really necessary
  85. to print out the C example files, but sometimes a hardcopy is a
  86. real convenience.
  87.  
  88.  
  89.  
  90.                      Coronado Enterprises
  91.                     12501 Coronado Ave NE
  92.                 Albuquerque, New Mexico 87122
  93.  
  94. ---------------------------------
  95.  
  96.  
  97. Coronado Enterprises Turbo C TUTOR                July 1, 1987
  98.  
  99. COMPILER.DOC file
  100.  
  101. This tutorial is written specifically for the Turbo-C compiler
  102. by Borland International.  It is written for the first release
  103. of that particular compiler, and many of the topics discussed
  104. refer to the User's Guide and Reference Guide for that particular
  105. release.  For that reason, when Borland releases a new version,
  106. some of the page numbers may be in error for the new release, but
  107. the topics will still be useable and valid.  It is written to
  108. teach you how to read and write Turbo C programs but even more
  109. important, it is intended to teach you the vocabulary of the C
  110. language so that you can intelligently read the literature about C.
  111.  
  112. Due to the ease of use of the Integrated Environment version of
  113. Turbo C, It will be used exclusively by this tutorial.  You can
  114. use the Command Line version of Turbo C with this tutorial, but
  115. all notes in the tutorial will describe use of the Integrated
  116. Environment version.
  117.  
  118.  
  119.  
  120. ******** Note - Note - Note - Note - Note - Note - Note *********
  121.  
  122. All of the files in the Coronado Enterprises Turbo C tutorial are
  123. designed to work with the Turbo C compiler with all options left
  124. in the default mode (ie - the way the compiler comes from the
  125. factory), and any changes may affect the way some of the example
  126. programs work.  For example, if you were to change the number of
  127. significant characters used for an identifier to 4, the program
  128. named SCOPE.C in chapter 5, would have all 3 functions named the
  129. same, namely "head", and the program would not work.  You would
  130. actually have other problems with this change, but they will not
  131. be commented on here.  Other kinds of errors are also possible, so
  132. it would be best that you simply use the Borland defaults for the
  133. duration of the tutorial and when you have gained experience with
  134. C, customize your compiler to suit your own taste.
  135.  
  136.  
  137.  
  138.  
  139. ****************** Suggested Hard Disk Setup *********************
  140. The Turbo C User's Guide has complete instructions describing
  141. how to set up your system for proper use.  Following the direc-
  142. tions given will result in the following directory setup if you
  143. are using a hard disk.  Some of the files have been omitted in
  144. this suggested setup to reduce the clutter in the TURBOC directory.
  145. This will reduce the confusion over extra files as you work your
  146. way through the tutorials.
  147.  
  148.  
  149.    Turbo C disk 1 - INTEGRATED DEVELOPMENT ENV.
  150.    Turbo C disk 2 - COMMAND LINE/UTILITIES
  151.    Turbo C disk 3 - HEADER FILES/LIBRARIES/EXAMPLES
  152.    Turbo C disk 4 - LIBRARIES/EXAMPLES
  153.  
  154. C:\TURBOC\
  155.     TC.EXE                  /* From Turbo C disk 1              */
  156.     TCCONFIG.TC             /* You make this file - See below   */
  157.     TCHELP.TCH              /* From Turbo C disk 1              */
  158.     *.*                     /* From Turbo C Tutor SOURCE disk   */
  159.  
  160. C:\TURBOC\INCLUDE\
  161.     *.H                     /* From Turbo C disk 3              */
  162.  
  163. C:\TURBOC\INCLUDE\SYS\
  164.     STAT.H                  /* From Turbo C disk 3 \SYS\ subdir.*/
  165.  
  166. C:\TURBOC\LIB\
  167.     *.OBJ                   /* From Turbo C disk 3              */
  168.     *.LIB                   /* From Turbo C disk 3              */
  169.     *.OBJ                   /* From Turbo C disk 4 - optional   */
  170.     *.LIB                   /* From Turbo C disk 4 - optional   */
  171.  
  172. The *.OBJ and *.LIB files from disk 4 are needed only if you wish
  173. to use additional memory models.  You only need the "Small" memory
  174. model to run all of the programs included in the Coronado Enter-
  175. prises Turbo C tutorial.
  176.  
  177. After creating the subdirectories listed above and loading them
  178. with the files listed, change to the TURBOC directory and create
  179. the TCCONFIG.TC file by following these instructions (note that
  180. the instructions are given on page 16 of the Turbo C User's guide
  181. but they are somewhat cryptic for the beginner).
  182.  
  183. 1.   TC<return>                  This loads the TURBO-C compiler
  184. 2.   O                           Selects "Options"
  185. 3.   E                           Selects "Environment"
  186. 4.   I                           Selects "Include directories"
  187. 5.   \TURBOC\INCLUDE<return>     Sets directory for include files
  188. 6.   L                           Selects "Library directory"
  189. 7.   \TURBOC\LIB<return>         Sets directory for library files
  190. 8.   <Esc>                       Returns to "Options" menu
  191. 9.   S                           Selects "Store options"
  192. 10.  <return>                    Stores file named "TCCONFIG.TC"
  193. 11.  <Esc>                       Return to the TURBO-C main menu
  194.  
  195.  
  196.  
  197.  
  198. To run your first program.  (This assumes FIRSTEX.C has been copied
  199. into the \TURBOC\ directory from the tutorial SOURCE disk.)
  200.  
  201. 1.   TC<return>                  Loads the Turbo C compiler
  202. 2.   F                           Selects "Files"
  203. 3.   L                           Selects "Load"
  204. 4.   <return>                    Lists all files *.C
  205. 5.   Position cursor on FIRSTEX.C
  206. 6.   <return>                    Loads FIRSTEX.C
  207. 7.   Alt-R                       Compiles and runs FIRSTEX
  208.  
  209.  
  210.  
  211.  
  212.  
  213. **************** Suggested Dual Floppy Disk Setup *****************
  214.  
  215. The Turbo C User's Guide has very sketchy information on how to set
  216. up the system for use from two floppies so the following information
  217. is given to get you started.  As you gain experience with the C lan-
  218. guage, you can add features and move files around to make it more
  219. convenient to use.  The setup given here will result in the source
  220. files and executable files residing on drive B.  You will develop a
  221. more convenient system soon, but this setup will get you started.
  222. You will find that you will have to stop often and erase the *.OBJ
  223. and the *.EXE files that are generated by Turbo C or your disk will
  224. fill up with these extra files.
  225.  
  226. Format a disk with the system on it (ie - FORMAT A:/S) and put the
  227. following files on it for your drive A disk.
  228.  
  229.     TC.EXE                  /* From Turbo C disk 1              */
  230.     TCCONFIG.TC             /* You make this file - see below   */
  231.     TCHELP.TCH              /* From Turbo C disk 1              */
  232.                             /* Note - You will probably have    */
  233.                             /* room for an AUTOEXEC.BAT file on */
  234.                             /* this disk also.                  */
  235.  
  236.  
  237. Format a disk without the system, make the following directories
  238. on it, and add the following files to it in their respective dir-
  239. ectories. This will be the disk for drive B.  You will put a few
  240. of the source files from the Coronado Enterprises tutorial on this
  241. disk in the root directory.
  242.  
  243. \
  244.     *.C                     /* From the Turbo C Tutor SOURCE disk */
  245.  
  246. \INCLUDE\
  247.     *.H                     /* From Turbo C disk 3                */
  248.  
  249. \INCLUDE\SYS\
  250.     STAT.H                  /* From Turbo C disk 3                */
  251.  
  252. \LIB\
  253.     COS.OBJ                 /* From Turbo C disk 3                */
  254.     CS.LIB                  /* From Turbo C disk 3                */
  255.     EMU.LIB                 /* From Turbo C disk 3                */
  256.     FP87.LIB                /* From Turbo C disk 3                */
  257.     MATHS.LIB               /* From Turbo C disk 3                */
  258.  
  259.  
  260. After creating the disks as listed above, install the disks in
  261. drive A and drive B and boot up the computer on drive A.  You
  262. must then create the TCCONFIG.TC file by following these instruc-
  263. tions (note that the instructions are given on page 14 of the Turbo
  264. C User's guide but they are somewhat cryptic for the beginner).
  265.  
  266.  
  267. 1.   TC<return>                  This loads the TURBO-C compiler
  268. 2.   O                           Selects "Options"
  269. 3.   E                           Selects "Environment"
  270. 4.   I                           Selects "Include directories"
  271. 5.   B:\INCLUDE<return>          Sets directory for include files
  272. 6.   O                           Selects "Output directory"
  273. 7.   B:\<return>                 Sets directory for output files
  274. 8.   L                           Selects "Library directory"
  275. 9.   B:\LIB<return>              Sets directory for library files
  276. 10.  <Esc>                       Returns to "Options" menu
  277. 11.  S                           Selects "Store options"
  278. 12.  <return>                    Stores file named "TCCONFIG.TC"
  279. 13.  <Esc>                       Return to the TURBO-C main menu
  280. 14.  F                           Selects the "File" menu
  281. 15.  L                           Selects the "Load" submenu
  282. 16.  B:*.C<return>               Selects the B drive for files
  283. 17.  <Esc>                       Return to the "File" menu
  284. 18.  <Esc>                       Return to the TURBO-C main menu
  285.  
  286. Note that steps 14 through 16 must be performed once each time the
  287. Turbo C system is started to tell the system where to find the
  288. working files.
  289.  
  290. To run your first program.  (This assumes FIRSTEX.C has been copied
  291. into the root directory from the tutorial SOURCE disk.)  Load the
  292. two disks into the computer and boot up the system.
  293.  
  294. 1.   TC<return>                  Loads the Turbo C compiler
  295. 2.   F                           Selects "Files"
  296. 3.   L                           Selects "Load"
  297. 4.   B:*.C<return>               Lists all files *.C
  298. 5.   Position cursor on FIRSTEX.C
  299. 6.   <return>                    Loads FIRSTEX.C
  300. 7.   Alt-R                       Compiles and runs FIRSTEX
  301.  
  302.  
  303.  
  304.  
  305. **************** Suggested Single Floppy Disk Setup ****************
  306.  
  307. In order to use the Turbo C compiler with a single floppy disk,
  308. set up two disks as noted for the Dual Floppy Disk system.  Use the
  309. disk designated for drive A above to boot up the computer and perform
  310. steps 1 through 13 given above, leaving off the drive designation for
  311. drive B in steps 5, 7, 9, and 16.
  312.  
  313. To run the system, use the disk designated for drive A for booting
  314. and loading the TC system, then install the other disk as the work-
  315. ing disk.  You will have all of the capabilities of the dual drive
  316. system except for the "HELP" facility and the ability to run an oper-
  317. ating system shell from within the Turbo C Integrated environment.
  318.  
  319. ----------------------------------
  320.  
  321. If this documentation scrolled off the screen faster than you could read
  322. it, it can be printed by the command:
  323.                                      COPY PBS.TXT PRN
  324.